// getter是state的一个映射
export const singer = state => state.singer
export const playing = state => state.playing
export const fullScreen = state => state.fullScreen
export const playlist = state => state.playlist
export const sequenceList = state => state.sequenceList
export const mode = state => state.mode
export const currentIndex = state => state.currentIndex
export const disc = state => state.disc
export const topList = state => state.topList
export const searchHistory = state => state.searchHistory
export const currentSong = (state) => {
  // if (state.currentIndex === -1) {
  // return false
  // } else if (state.playlist.length > 1) {
  return state.playlist[state.currentIndex] || {}
  // }
  // return state.playlist[0][state.currentIndex] || {}
}
